package persistence;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the emails database table.
 * 
 */
@Entity
@Table(name="emails")
public class Email implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idemails;
	private String email;
	private Firm firm;

    public Email() {
    }


	@Id
	public int getIdemails() {
		return this.idemails;
	}

	public void setIdemails(int idemails) {
		this.idemails = idemails;
	}


	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	//bi-directional many-to-one association to Firm
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="Firm_crd", referencedColumnName="crd"),
		@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm")
		})
	public Firm getFirm() {
		return this.firm;
	}

	public void setFirm(Firm firm) {
		this.firm = firm;
	}
	
}